#pragma once

// CTabCtrlEx
class CButtonEx : public CButton
{
	DECLARE_DYNAMIC(CButtonEx)

public:
	CButtonEx();
	virtual ~CButtonEx();

protected:
	DECLARE_MESSAGE_MAP()

public:
	bool m_bFocus;
	void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
		//afx_msg void OnPaint();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
};

class CTabCtrlEx : public CTabCtrl
{
	DECLARE_DYNAMIC(CTabCtrlEx)

public:
	CTabCtrlEx();
	virtual ~CTabCtrlEx();

protected:
	DECLARE_MESSAGE_MAP()

	afx_msg void OnSize(UINT nType, int cx, int cy);
	CPen m_penDark;
	CPen m_penGray;
	CPen m_penWrite;

	void DrawItem(CPaintDC& dc,int iItem);
	void DrawWndPane(CPaintDC& dc);
	void DrawText(CPaintDC& dc);

	int	 m_iCurItem;
	CRect m_WndRect;
	CRect m_FocusItemRect;

	CButtonEx	m_btnClose;

public:
	CString GetItemText(int iItem );
	void SetItemText(int iItem ,CString sText);
	afx_msg void OnBnClose();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
};


